{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!--BOOK_INFORMATION-->\n",
    "<img align=\"left\" style=\"padding-right:10px;\" src=\"figures/PHydro-cover-small.png\">\n",
    "*This is the Jupyter notebook version of the [Python in Hydrology](http://www.greenteapress.com/pythonhydro/pythonhydro.html) by Sat Kumar Tomer.*\n",
    "*Source code is available at [code.google.com](https://code.google.com/archive/p/python-in-hydrology/source).*\n",
    "\n",
    "*The book is available under the [GNU Free Documentation License](http://www.gnu.org/copyleft/fdl.html). If you have comments, corrections or suggestions, please send email to satkumartomer@gmail.com.*"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<!--NAVIGATION-->\n",
    "< [Unsupervised Classiﬁcation](06.10-Unsupervised-Classiﬁcation.ipynb) | [Contents](Index.ipynb) | [Date Axis](07.01-Date-Axis.ipynb) >"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 第7章\n",
    "## 绘图\n",
    "\n",
    "我们在绘图中遇到的第一个问题是字体大小。我们可以通过指定pyplot的fontsize方法来改变字体的大小，但是在这里我们需要指定所有位置的字体。这变成了繁琐的任务，尤其是当你想要绘制许多的图时。还有另外一种方法来解决这个问题，通过更新plt中的`prcParams`方法。更新按照以下方式完成。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "params = {\n",
    "'axes.labelsize': 17,\n",
    "'font.size': 17,\n",
    "'legend.fontsize': 17,\n",
    "'xtick.labelsize': 17,\n",
    "'ytick.labelsize': 17,\n",
    "'text.usetex': False,\n",
    "'font.size':17}\n",
    "plt.rcParams.update(params)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "参数的名称是自我解释的。如果我们想要为所有类型的文本(例如.ticks,ticks,legend等)中保留相同的字体大小，我们可以简单地更新`font.size`。在绘制图形并定义合适你的值之前，先写这这一点是一个很好的做法。如果稍后你想要改变某些图形属性的字体大小，你可以在那里定义特定的值。我们将在今后所有图形中使用这些字体大小，但为简洁起见，不会将此文本添加到每个代码中。"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
